<?php

namespace app\common\model;

use think\Model;

class Appoint extends Model
{
    public static $plan_time = [
        '当天',
        '三天内',
        '一周内',
        '半年以后'
    ];


    public function getSexAttr($value, $data)
    {
        $sex_data = [1 => '先生', 2 => '女士'];
        return $sex_data[$data['sex']];
    }

    public function getPlanTimeAttr($value, $data)
    {
        return self::$plan_time[$data['plan_time']];
    }

    public function getTypeAttr($value, $data)
    {
        $arr = [1 => '全天', 2 => '工作日', 3 => '双休'];
        return $arr[$data['type']];
    }
}
